package com.alan.camunda.boot.listener;

import lombok.extern.slf4j.Slf4j;
import org.camunda.bpm.engine.delegate.BpmnError;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.ExecutionListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component("callProcessEndExecutionListener")
public class CallProcessEndExecutionListener implements ExecutionListener {

    @Override
    public void notify(DelegateExecution execution) throws Exception {

        execution.setVariable("_R", 1);
        log.info("CallProcessEndExecutionListener call process end");
        //throw new BpmnError("StopProcessError" );
    }


}
